class Camera
{
  PVector position;
  GameObject target;
  
  public Camera(GameObject t){
    target = t; 
    position = new PVector(t.position.x, t.position.y);
    
  }
  
  public void update(){
    if(target instanceof Ship && !(((Ship)target).getAlive())){
      position.add(target.velocity);
    }else{
      PVector temp = new PVector(position.x, position.y);
      temp.sub(target.position);
      temp.mult(.125); //Modify this to adjust the camera
      position.sub(temp);
    }
  }
  
}
